#ifndef _NE_SUB_MESH_H_
#define _NE_SUB_MESH_H_

#include <common/Object.h>
#include <graphics/IndexData.h>
#include <graphics/Material.h>

namespace ne
{
    class NEAPI SubMesh : public Object
    {
        public:
            explicit SubMesh(const std::string &name);

            size_t getSize() const;

            void setIndexData(const IndexDataPtr &pIndexData);

            IndexDataPtr getIndexData() const;

            void setMaterial(const MaterialPtr &pMaterial);

            MaterialPtr getMaterial() const;

            virtual ~SubMesh();

        private:
            IndexDataPtr mpIndexData;
            MaterialPtr mpMaterial;
    };

    typedef SharedPtr<SubMesh> SubMeshPtr;

    typedef std::map<std::string, SubMeshPtr> SubMeshMap;
    typedef SubMeshMap::iterator SubMeshMapIterator;
    typedef SubMeshMap::const_iterator SubMeshMapConstIterator;
}

#endif
